.top-head {
    background-color: var(--stroke-grey-2);
    position: relative;
}
.topbar {
    align-items: flex-end;
    box-sizing: border-box;
    display: flex;
    background-color: var(--stroke-main);
    height: 48px;
    padding: 0 16px;
}

.topbar .logo-wrapper {
    align-items: flex-end;
    display: flex;
}

.topbar .logo-wrapper button {
    margin: 0 4px;
}

.bottom-page .topbar .logo-wrapper button {
    margin: 0;
    margin-inline-start: 20px;
}

.topbar .logo {
    --icon-size: 24px;
    background: none;
    height: auto;
    padding: 4px;
    margin: 0;
    width: auto;
}
.topbar .fm-import-download-buttons {
    margin-left: 8px;
}
.dropdown-section .dropdown-section-item {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}
.dropdown-section-header {
    display: flex;
    width: 100%;
    justify-content: center;
}
.dropdown-section-header .dropdown-section-header-contents {
    display: flex;
    width: 100%;
    justify-content: space-between;
}
.dropdown-section-body{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    color: var(--text-color-high);
}
.dropdown-section-body .dropdown-section-body-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-self: stretch;
    min-height: 48px;
    gap: 8px;
    padding: 4px 16px;
    padding-inline-start: 20px;
    margin: 0 4px;
}
.dropdown-section-body .dropdown-section-body-item:hover {
    background: var(--mobile-surface-1);
    border-radius: var(--mobile-border-radius-medium);
}
.dropdown-section-body .dropdown-section-body-item:focus {
    background: var(--mobile-surface-2);
}
.dropdown-section-body .dropdown-recently-searched-item {
    display: flex;
}
.dropdown-search-results-item-filename .prefix {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: pre;
}
.dropdown-search-results-item-file-icon {
    width: 22px;
    height: 24px;
    grid-column: 1;
    align-self: center;
}
.dropdown-recently-searched-item .dropdown-recently-searched-item-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.dropdown-recent-item-delete-icon {
    --icon-size: 16px !important;
    --mask-color: var(--icon-rest) !important;
}
.dropdown-item-text-medium {
    color: var(--text-color-medium);
    font: var(--text-body2);
}
.dropdown-no-recents {
    display: inline-flex;
    padding: 24px;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.dropdown-no-recents i {
    --icon-size: 96px !important;
}
.dropdown-no-recents .dropdown-no-recents-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.dropdown-no-recents .dropdown-no-recents-content-header {
    color: var(--text-color-high);
    font: var(--text-h2);
    font-weight: 700;
}
.dropdown-no-recents .dropdown-no-recents-content-text {
    color: var(--text-color-high);
    font: var(--text-body1);
    font-weight: 400;
    line-height: 30px;
}
.dropdown-search .search-loader {
    display: flex;
    position: relative;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    padding: 34px 0;
    margin: auto;
}
.dropdown-search .search-loader::after {
    content: "";
    width: 30px;
    height: 30px;
    border: 5px solid #00c0a6;
    border-top-color: var(--progress-round-fill);
    border-radius: 50%;
    animation: loading 0.75s ease infinite;
}

@keyframes loading {
from {
    transform: rotate(0turn);
}
to {
    transform: rotate(1turn);
}
      }

.topbar .fmdb-loader {
    display: inline-block;
    margin: 4px 24px;
    width: 24px;
    height: 24px;
    opacity: 0;
    transition: opacity 100ms;
}
.fmdb-working .topbar .fmdb-loader {
    animation: rotate 1.5s linear infinite;
    animation-timing-function: steps(12, end);
    opacity: 1;
}
.fmdb-working .topbar .fmdb-loader::after {
    content: '';
    top: -1px;
    background: transparent;
    display: block;
    position: absolute;
    left: -1px;
    bottom: -1px;
    right: -1px;
    border: 2px solid var(--stroke-main);
}
.topbar-links {
    align-items: center;
    display: flex;
    height: 32px;
    position: relative;
}
.mega-lite-mode .topbar-links {
    height: auto;
}
.topbar-links > .dropdown {
    align-items: center;
    display: flex;
    height: 100%;
}

/* Icon Button */

.topbar .btn-icon {
    cursor: pointer;
    background-color: transparent;
    border: none;
    outline: transparent;
    margin: 0;
    margin-inline-end: 20px;
    padding: 4px;
    transition: margin 0.2s ease-in-out;
}

.topbar .btn-icon:last-child {
    margin-inline-end: 0;
}

.topbar .btn-icon.menu-open {
    margin-inline-start: 220px;
}
.topbar-links .btn-icon i,
.topbar .btn-icon i {
    --icon-size: 24px;
    vertical-align: middle;
}
.topbar .btn-icon i.sprite-fm-mono,
.topbar-links .btn-icon i.sprite-fm-mono {
    --mask-color: var(--icon-active);
}

/*
 * Icon Buttons separator.
 * Hidden by default, but visible is aany previous element if shown.
 * Should have common wrappper with element, whicch are separated
*/

.topbar :not(.topbar-links) hr,
.topbar .top-change-language.hidden + hr {
    display: none;
}
.topbar hr {
    background-color: var(--divider-color);
    border: 0;
    content: '';
    height: calc(100% - 8px);
    margin: 0;
    margin-inline-end: 20px;
    width: 1px;
}
.topbar :not(.topbar-links) *:not(.hidden) ~ hr {
    display: block;
}

/* Top  bar Avatar and presence status */

.topbar-links .btn-icon .avatar-wrapper {
    float: none;
    font-size: 12px;
    height: 24px;
    line-height: 24px;
    width: 24px;
}

.topbar-links .btn-icon .small-rounded-avatar img {
  width: 24px;
  height: 24px;
}

.topbar .btn-icon .activity-status-block {
    margin: 0;
    margin-inline-start: 15px;
    position: absolute;
    top: 1px;
    z-index: 5;
}

/* Icon badge. Used in notification button */

.icon-badge {
    background-color: var(--secondary-red);
    font-size: 12px;
    color: var(--text-color-white-higher);
    text-align: center;
    width: auto;
    border-radius: 9px;
    position: absolute;
    top: 0;
    left: 17px;
    display: inline;
    line-height: 14px;
    padding: 1px 4px 0;
}
.topbar .activity-status.top::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    display: block;
    z-index: 10;
    left: -3px;
    top: -3px;
}
.topbar .dropdown {
    line-height: 0;
    position: relative;
}
.mega-lite-mode .topbar .dropdown .notification {
    display: none;
}
.topbar .back-to-mega-button {
    display: none;
    margin-right: 20px;
}
.mega-lite-mode .topbar .back-to-mega-button {
    display: inline-block;
}
.topbar .dropdown-content {
    display: none;
    position: absolute;
}
.topbar .dropdown.show .dropdown-content {
    display: block;
    right: -10px;
}
.topbar .dropdown-arrow {
    right: -30px;
    top: 40px;
    width: auto;
}
.topbar .dropdown-arrow::before {
    content: '';
    width: 12px;
    height: 12px;
    position: absolute;
    background: var(--arrow-color, var(--surface-main));
    border-bottom: 1px solid var(--stroke-grey-2);
    border-right: 1px solid var(--stroke-grey-2);
    z-index: 123;
    transform: rotateZ(-135deg);
    top: -7px;
    right: 38px;
}
.topbar .top-login-popup.dropdown-arrow::before {
    right: 80px;
}
.topbar .account-dialog {
    width: auto;
}
.topbar .dropdown.account .dropdown.popup {
    width: 312px;
    padding: 0;
}
.topbar .account-dialog .header {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--divider-color);
    margin-bottom: 8px;
}
.topbar .account-dialog .body {
    top: 10px;
}
.account-avatar .small-rounded-avatar {
    height: 64px;
    width: 64px;
    border-radius: 8px;
}
.topbar .account-dialog .account-info {
    flex-grow: 1;
    margin-inline-start: 16px;
    display: flex;
    flex-direction: column;
}
.topbar .activity-status-wrapper {
    display: flex;
    align-items: center;
    margin-top: 5px;
}
.topbar .account-dialog .account-info .activity-status-block{
    position: relative;
    left: 0;
    margin: 0;
    width: min-content;
}
.topbar .account-dialog .account-info .name {
    color: var(--text-color-higher);
    font: var(--text-h3);
    letter-spacing: 0;
    line-height: 24px;
 }
.topbar .account-dialog .account-info .email {
    opacity: 0.7;
    color: var(--text-color-higher);
    font: var(--text-body1);
    letter-spacing: 0;
    line-height: 20px;
 }
.topbar .account-dialog .account-info .name,
.topbar .account-dialog .account-info .email {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar .account-dialog .account-info .activity-text {
    opacity: 0.7;
    color: var(--text-color-higher);
    font: var(--text-body1);
    letter-spacing: 0;
    line-height: 20px;
    margin-left: 5px;
 }
.topbar .account-dialog ul.links {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    width: 100%;
}
.topbar .account-dialog ul.links li {
    font: var(--text-body1);
    margin: 0 8px;
    position: relative;
}
.topbar .account-dialog ul.links li button {
    --mask-color: var(--icon-rest);
    align-items: center;
    display: flex;
    padding: 8px;
    width: 100%;
    text-align: left;
    color: var(--text-color-medium);
    border-radius: 4px;
    font: var(--text-body1);
    background-color: transparent;
    border: none;
    outline: transparent;
    cursor: pointer;
    transition: var(--transition-color), var(--transition-bg-color);
    margin: 0;
    float: none;
    box-sizing: border-box;
}
.topbar .account-dialog ul.links li button:hover,
.topbar .account-dialog ul.links li button.active {
    --mask-color: var(--icon-active);
    background: var(--surface-grey-2);
    color: var(--text-color-high);
    opacity: 1;
}
.topbar .account-dialog ul.links li button span {
    flex: 1;
}
.rtl .topbar .account-dialog ul.links li button span {
    flex: unset;
}
.topbar .account-dialog ul.links li button > i {
    --icon-size: 16px;
    margin-inline-end: 8px;
    transition: var(--transition-color);
}
.topbar .account-dialog ul.links li button > span + i {
    --icon-size: 16px;
    margin: 0;
    margin-inline-start: 8px;
}
.topbar .account-dialog ul.links li button.feedback.highlight {
    color: var(--secondary-blue);
}
.rtl .topbar .account-dialog ul.links li button > span + i {
    transform: rotate(180deg);
}
.topbar .account-dialog ul.links li .status-dropdown {
    position: relative;
    display: block;
}
.topbar .account-dialog ul.links li .status-dropdown .dropdown-content {
    display: none;
    position: absolute;
    left: -242px;
    top: -24px;
    width: 242px;
    z-index: 1;
    padding: 19px;
    background: var(--surface-main);
    border-radius: 24px;
    border: var(--dropdown-border);
    min-width: 160px;
    min-height: 32px;
    box-sizing: border-box;
    box-shadow: var(--dropdown-shadow);
  }
.topbar .account-dialog ul.links li .status-dropdown:hover .dropbtn {
    background-color: var(--stroke-grey-2);
    color: var(--text-color-high);
}
.topbar .account-dialog ul.links li .status-dropdown:hover .dropdown-content {
    display: block;
}
.topbar .account-dialog ul.links li.separator {
    height: 1px;
    margin: 8px 0;
    background-color: var(--divider-color);
}
.topbar .notification-popup .fm-notifications-bottom {
    border-top: 1px solid var(--divider-color);
    justify-content: flex-end;
    padding: 12px 20px 16px
}
.topbar .top-warning-popup .fm-notifications-bottom {
    border-top: none;
    justify-content: flex-end;
    padding: 24px 0 0
}
.topbar .notification-popup .notification-txt {
    background: none
}
.topbar .dropdown.top-login-popup {
    position: absolute;
    top: 62px;
    right: 10px;
    min-width: 160px;
    min-height: 32px;
}
.topbar .dropdown.top-login-popup .dropdown-white-arrow{
    left: auto;
    right: 79px;
    top: -11px;
}
.topbar .top-icon.pass-reminder {
    width: 24px;
    height: 24px;
    padding: 0;
    margin-inline-end: 14px;
    margin-inline-start: 6px;
    position: relative;
    top: -6px;
}
.topbar .top-icon.pass-reminder i {
    width: 100%;
    height: 100%;
}
.topbar .top-icon.pass-reminder::before {
    content: none;
}
/* Change top language button */

.topbar .top-change-language {
    padding: 4px 0;
}

.top-change-language-name {
    color: var(--text-color-high);
    font: var(--text-body1-bold);
    padding-inline-start: 4px;

    /* stylelint-disable-next-line property-disallowed-list */
    text-transform: uppercase;
    vertical-align: middle;
}

/* mega-buttons in top bar */

.top-buttons button {
    margin: 0;
    min-width: 68px;
    display: inline-block;
}

.top-buttons button:not(.hidden) + button {
    margin-inline-start: 12px;
}

.top-head .top-buttons {
    display: flex;
    margin-inline-end: 16px;
}

.top-head .top-buttons.business {
    display: none;
    position: relative;
}

.business .top-head .top-buttons {
    display: none;
}

.business .top-head .top-buttons.business {
    display: block;
}
/* Download Page Topbar changes */
.topbar .logo-full {
    --width: 98px;
    width: 98px;
    height: 32px;
    display: none;
    cursor: pointer;
}
.bottom-page.download .topbar .logo-full {
    display: inline-block;
}
.bottom-page.download .topbar .logo,
.bottom-page.download .topbar .logo-wrapper button,
.active-folder-link .topbar .logo-wrapper button {
    display: none;
}

@media only screen and (max-width: 625px) {
    .topbar {
        align-items: center;
        height: 64px;
    }
}
